﻿using System;
using System.Xml.Linq;

namespace Maple.Weixin.MP.Exceptions
{
    public sealed class BadXmlFormatException : FormatException
    {
        private readonly XDocument document;

        public BadXmlFormatException(XDocument document) {
            this.document = document;
        }

        public override string Message
        {
            get { return "Xml文档的格式不正确！"; }
        }

        public override string StackTrace
        {
            get { return document.ToString(SaveOptions.None); }
        }
    }
}
